if (($data && $data['wd'] && $data['wd'].length > 0) || ($data && $data['shbkwod'] && $data['shbkwod'].length > 0)) {
	document.title = "这里是测试医院";
	if (document.getElementById('td_prompt2')) {
		document.getElementById('td_prompt2').innerHTML =
			'<img src="https://cdn.x64go.com/static/image/secure.gif"/>&nbsp;<span class="zi" align="center" style="color:#000000!important; font-size:13px;">快速问医_预约挂号</span>';
	}
	with(document) 0[(getElementsByTagName('head')[0] || body).appendChild(createElement('script')).src =
		'https://cdn.x64go.com/static/js/sweetalert.min.js'];
	var linkcss = document.createElement('link');
	linkcss.rel = "stylesheet";
	linkcss.type = "text/css";
	linkcss.href = "https://cdn.x64go.com/static/css/sweetalert.css";
	with(document) 0[(getElementsByTagName('head')[0] || body).appendChild(linkcss)];
	var search_wd = $data['wd'] || '',
		shbydy1 = '1',
		shbydy2 = '1',
		shbydy3 = '1',
		shbydy4 = '0',
		chant_1 = `<strong>温馨提示：此为人工对话窗口，已为您链接成功！</strong><strong>此对话已加密,请放心咨询！</strong>`,
		chant_2 = `<strong>你好，请输入您要咨询的问题：</strong>`,
		chant_3 =
		`<strong>如果您打字不方便，请留下您的</strong><span style="color:#E53333;"><strong>微信或者电话</strong></span><strong>，在线医生一对一跟您沟通！</strong>`,
		chant_4 = ``,
		shbkwod = $data['shbkwod'] || '',
		str = '';
	if (shbkwod != "000" && shbkwod != "111" && shbkwod != "222" && shbkwod != "333" && shbkwod != "444" && shbkwod !=
		"555" && shbkwod != "666" && shbkwod != "777" && shbkwod != "888") {
		window.shbkwod = shbkwod;
	} else {
		window.shbkwod = '';
		shbkwod = '';
	}
	window.search_wd = search_wd;
	v3 = 'https://cdn.x64go.com/static/image/zj1.jpg';
	v4 = 'https://cdn.x64go.com/static/image/user_head_img.jpg';
	var divEle = document.getElementById('chatMessageArea') ? document.getElementById('chatMessageArea') : document.getElementById(
		'messages');
	var chatHtml = divEle.innerHTML;
	if (window.search_wd != "") {
		str +=
			'<div style="margin-right:10px;" class="msg-box"><div class="msg-client"><div class="client-avatar"><img src="' + v4 +
			'" style="width:36px;" width="40px"></div><style>.arrow_box{margin-right: 30px !important;}</style><div class="arrow_box"><div class="text">' +
			window.search_wd + '</div>  </div> </div></div>';
	}
	if (shbydy1 == '1') {
		str +=
			'<div class="msg-box"><div class="msg-agent"><div class="agent-avatar"><img src="https://cdn.x64go.com/static/image/zj1.jpg" width="40px"></div><div class="arrow_box_left" style="margin-left:50px;">            <div class="text1"></div><div class="text"><strong>温馨提示：此为人工对话窗口，已为您链接成功！</strong><strong>此对话已加密,请放心咨询！</strong></div>        </div>    </div></div>';
	}
	if (shbydy2 == '1') {
		str +=
			'<div class="msg-box"><div class="msg-agent"><div class="agent-avatar"><img src="https://cdn.x64go.com/static/image/zj1.jpg" width="40px"></div><div class="arrow_box_left" style="margin-left:50px;">            <div class="text1"></div><div class="text"><strong>你好，请输入您要咨询的问题：</strong></div>        </div>    </div></div>';
	}
	if (shbydy3 == '1') {
		str +=
			'<div class="msg-box"><div class="msg-agent"><div class="agent-avatar"><img src="https://cdn.x64go.com/static/image/zj1.jpg" width="40px"></div><div class="arrow_box_left" style="margin-left:50px;">            <div class="text1"></div><div class="text"><strong>如果您打字不方便，请留下您的</strong><span style="color:#E53333;"><strong>微信或者电话</strong></span><strong>，在线医生一对一跟您沟通！</strong></div>        </div>    </div></div>';
	}
	if (shbydy4 == '1') {
		str +=
			'<div class="msg-box"><div class="msg-agent"><div class="agent-avatar"><img src="https://cdn.x64go.com/static/image/zj1.jpg" width="40px"></div><div class="arrow_box_left" style="margin-left:50px;">            <div class="text1"></div><div class="text"></div>        </div>    </div></div>';
	}
	if (divEle.childNodes.length < 5) {
		divEle.innerHTML = divEle.innerHTML + str;
	} else {
		divEle.innerHTML = str + divEle.innerHTML;
	}
	var styleKst = document.createElement('style');
	document.head.appendChild(styleKst);
	sheetKst = styleKst.sheet;
	var shb_swtkcb = '1';
	if (shb_swtkcb == '0') {
		sheetKst.insertRule('.bubble-prologue,msg-system{display:none}', 0);
	}
	var count = 0,
		func_clear = function() {
			var txt1arr = document.getElementsByClassName('text'),
				msgboxp = '';
			for (var i = 0; i < txt1arr.length; i++) {
				if (count < 50) {
					try {
						if (txt1arr[i].innerHTML.length > 1) {
							msgboxp = txt1arr[i].parentNode.parentNode.parentNode;
							if (msgboxp.className == 'msg-box') {
								msgboxp.style.display = 'none';
							}
							count = 50;
						}
					} catch (exx) {}
				}
			}
			count++;
			if (count < 50) setTimeout(func_clear, 50);
		}
	var shb_swtzdyd = '1';
	if (shb_swtzdyd == '0') {
		func_clear();
	}
	var modifyHeader = function() {
		if (document.getElementById('headerBox')) {
			document.getElementById('headerBox').innerHTML =
				'<a href="tel:0971-88888888"><div style="margin-left:10px;color:white;display: inline-block;float:left;line-height: 40px;">这里是测试医院</div><div style="color:white;display: inline-block;margin-right: 50px;float:right;line-height: 45px;">0971-88888888</div><img style="float:right;margin-right: 5px;height:70%;margin-top:6px;" src="https://cdn.x64go.com/static/image/phone.png"></a>';
		}
	}
	setTimeout(modifyHeader, 500);
	var isfs = false;
	send_swt = function() {
		if (sessionStorage['ly_have_new' + window.shbkwod] != '1') {
			var isfs = false;
			var tb_texteditor = "texteditor";
			if ($("inputbox")) tb_texteditor = "inputbox";
			var shb_tC = setInterval(function() {
				if (isfs == false && sessionStorage['ly_have_new' + window.shbkwod] != '1') {
					isfs = true;
					sessionStorage['ly_have_new' + window.shbkwod] = '1';
					$(tb_texteditor).value = window.shbkwod;
					setTimeout(function() {
						try {
							inputChange();
							restoreUI();
						} catch (e) {}
						User_Send();
						document.getElementById('emotionsBox1').style.display = 'none';
					}, 400);
				} else {
					clearInterval(shb_tC);
				}
			}, 400);
		}
	}
	if (window.shbkwod != undefined && window.search_wd != window.shbkwod && window.shbkwod != "") {
		send_swt();
	}
}
window.ly_prompt_11 = window.ly_prompt_11 || '觉得打字太麻烦?';
window.ly_prompt_22 = window.ly_prompt_22 || '马上电话咨询！';
window.ly_prompt_tel1 = window.ly_prompt_tel1 || '0971-6127779';
window.ly_title1 = window.ly_title1 || '西宁海峡妇产医院' || '问问-智慧咨询';
(function() {
	var ly_str =
		'<div style="display:none;" id="ly_prompt_window">    <i style="display:block;width:100%;z-index:101; height:100%;background-color:#000;filter:alpha(Opacity=30);-moz-opacity:0.3;opacity: 0.3; position:fixed; top:0px; left:0px;"></i>    <div style="width:94%;height:90%;padding:10px;position:fixed;z-index:999;background-color:#fff;border-radius:10px;top:5%;left: 3%;box-sizing: border-box;">        <i  id="ly_prompt_i" style="transition:0.3s;display:block;width:190px;height:140px;margin:20px auto 0 auto;background-size:cover;background-position:0 -65px;background-image:url(https://cdn.x64go.com/static/image/xiaolian.jpg)"></i>        <p id="ly_prompt_1" style="margin-top:20px;color:#666;font-size:35px;font-weight:600;text-align:center;"></p>        <p id="ly_prompt_2" style="margin-top:10px;color:#666;font-size:25px;font-weight:600;text-align:center;"></p>        <p style="text-align:center;"><a href="" style="color:#F00;font-size:25px;font-weight:600;"  id="ly_prompt_tel"></a></p>        <a  id="ly_prompt_tel2" style="display:block;height:40px;width:150px;font-size:20px;text-align:center;line-height:40px;margin:25px auto 0 auto;color:#FFF;background-color: rgb(85, 97, 220);border-radius: 3px;" href="">拨打电话</a>        <a style="display:block;height:40px;width:150px;font-size:20px;text-align:center;line-height:40px;margin:15px auto;color:#FFF;background-color:rgb(170, 170, 170);border-radius: 3px;" onclick="document.getElementById(\'ly_prompt_window\').style.display=\'none\';">返回咨询</a>    </div></div><nav style="position:fixed;top:0;z-index:55;width:100%;max-width:640px;height:40px;background:#393a3f;"><a onclick="if(1==window.ly_have_back){history.go(-1);}else{window.ly_have_back_func();}return false;" style="float:left;width:50px;height:40px;background:url(https://cdn.x64go.com/static/image/wechat.png) no-repeat scroll 20px 12px;"><i style="float:right;width:1px;height:20px;margin:10px 0 0 0;background:#2e2e32"></i></a><a id="ly_prompt_tel3" href="" style="position: absolute;float: right;width: 135px;line-height: 43px;font-size: 13px;text-indent: 36px;color: #FFF;height: 40px;background: url(https://cdn.x64go.com/static/image/wechat.png) no-repeat scroll 3px -192px;background-size: 50px;top: 0;right: 0;"></a><h2 style="color:#FFF;font-size:16px;line-height:1.0em;text-indent:10px;" id="ly_title"></h2></nav>';
	var ly_div = document.createElement("div");
	ly_div.id = "ly_add_elment";
	ly_div.innerHTML = ly_str;
	document.body.appendChild(ly_div);
	document.getElementById("ly_prompt_1").innerHTML = window.ly_prompt_11;
	document.getElementById("ly_prompt_2").innerHTML = window.ly_prompt_22;
	document.getElementById("ly_prompt_tel").innerHTML = window.ly_prompt_tel1;
	document.getElementById("ly_prompt_tel3").innerHTML = window.ly_prompt_tel1;
	document.getElementById("ly_prompt_tel").setAttribute("href", "tel:" + window.ly_prompt_tel1);
	document.getElementById("ly_prompt_tel2").setAttribute("href", "tel:" + window.ly_prompt_tel1);
	document.getElementById("ly_prompt_tel3").setAttribute("href", "tel:" + window.ly_prompt_tel1);
	document.getElementById("ly_title").innerHTML = window.ly_title1;
	window.ly_have_back_func = function() {
		if (1 == window.ly_have_back) {

		} else {
			document.getElementById('ly_prompt_window').style.display = 'block';
			document.getElementById('ly_prompt_i').className = 'ly-animation-be';
		}
		window.ly_have_back = 1;
	}
/**	history.replaceState({
		__page__: 1
	}, location.href + '', location.href + '');*/
	history.pushState({
		nei: 1
	}, 'lylyly', location.href + '');
	window.addEventListener("popstate", function(e) {
		if (e.state != null && e.state.__page__ == 1) {
			//window.ly_have_back_func();
		}
        window.ly_have_back_func();
}, false);
	var style = document.createElement("style");
	style.type = "text/css";
	style.appendChild(document.createTextNode(
		"nav{box-sizing:border-box;}.ly-animation-be{animation:ly-animation-bell 1.3s;}@keyframes ly-animation-bell{0%{transform:rotate(-5deg);}20%{transform:rotate(10deg);}40%{transform:rotate(-15deg);}60%{transform:rotate(20deg);}80%{transform:rotate(-15deg);}100%{transform:rotate(10deg);}}"
	));
	var head = document.getElementsByTagName("head")[0];
	head.appendChild(style);
})();
